package com.zhentao.controller;

import com.zhentao.mapper.BusinessShopTypeMapper;
import com.zhentao.mapper.BusinessUserMapper;
import com.zhentao.model.common.business.dto.BusinessShopAuditDto;
import com.zhentao.model.common.business.dto.BusinessShopDto;
import com.zhentao.model.common.business.dto.BusinessShopTypeDto;
import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.service.BusinessShopService;
import com.zhentao.service.BusinessShopTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/shop")
public class BusinessShopController {

    @Resource
    private BusinessShopService businessShopService;

    /**
     * 根据ID进行对商家店铺信息进行信息审核
     */
    @GetMapping("/updShopAudit")
    @ApiOperation("根据ID进行对商家店铺信息进行信息审核")
    public ResponseResult updShopAudit(BusinessShopAuditDto businessShopAuditDto){
        return businessShopService.updShopAudit(businessShopAuditDto);
    }



    /**
     * 店铺信息列表
     * 根据名称模糊查  分页  根据店铺状态查  店铺信息审核状态
     */
    @PostMapping("/shopList")
    @ApiOperation("商家信息列表--条件查")
    public ResponseResult shopList(@RequestBody BusinessShopDto businessShopDto){
        return businessShopService.shopList(businessShopDto);
    }




    /**
     * 店铺详情--根据账号ID进行查看当前的店铺信息
     */
    @GetMapping("/selShopOneById")
    @ApiOperation("店铺详情--根据账号ID进行查看当前的店铺信息")
    public ResponseResult selShopOneById(@RequestParam Integer id){
        return businessShopService.selShopOneById(id);
    }



}
